package com.tuniu.agents.message;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Tool Logger Annotation
 * Since version 1.0.0, it has transformed from a simple log to a complete annotation for tools.
 */
@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
public @interface ToolLoggerInfo {

    String beforeMessage() default ""; // Fixed string to be printed before method execution
    String afterMessage() default ""; // Fixed string to be printed after method execution
    String throwableMessage() default ""; // Fixed string to be printed when an exception occurs during the interface call
    String beforeMethod() default MessageLogger.DEFAULT_BEFORE_METHOD_NAME; // Spring Bean method to be executed before
    String afterMethod() default MessageLogger.DEFAULT_AFTER_METHOD_NAME; // Spring Bean method to be executed after
    String throwableMethod() default MessageLogger.DEFAULT_THROWABLE_METHOD_NAME; // Spring Bean method to be executed on exception
    String beanName() default ""; // Name of the Spring Bean to be executed

}
